package com.link.speechdemo;

import android.app.Application;
import android.content.Context;

import com.iflytek.cloud.SpeechConstant;
import com.iflytek.cloud.SpeechUtility;

/**
 * Created by Administrator on 2016/10/29.
 */

public class MyApplication extends Application {
    private static Context mContext;
    @Override
    public void onCreate() {
        mContext = getApplicationContext();
        StringBuffer param = new StringBuffer();
        param.append("appid=" + getString(R.string.app_id));
        param.append(",");
        // 设置使用v5+
        param.append(SpeechConstant.ENGINE_MODE + "=" + SpeechConstant.MODE_MSC);
        SpeechUtility.createUtility(this, param.toString());
        super.onCreate();
    }
    public static Context getGlobalContext(){
        return mContext;
    }
}
